import request from '@/utils/request'

const BASE_URL = '/admin/system/sysRole';

export default{

    getRoleList(page,limit,searchObj) {
        return request({
          url: `${BASE_URL}/${page}/${limit}`,
          method: 'get',
          params:searchObj
        })
      },

    addRole(sysRole){
      return request({
        url: `${BASE_URL}/addRole`,
        method: 'post',
        data:sysRole
      })
    },

    findById(id){
      return request({
        url: `${BASE_URL}/findById/${id}`,
        method: 'get',
        
      })
    },

    updateRole(sysRole){
      return request({
        url: `${BASE_URL}/updateRole`,
        method: 'post',
        data:sysRole
      })
    },

    removeRole(id){
      return request({
        url: `${BASE_URL}/removeRole/${id}`,
        method: 'delete',
      })
    },

    removeByIds(ids){
      return request({
        url: `${BASE_URL}/removeByIds`,
        method: 'delete',
        data:ids
      })
    },

    getRolesByUserId(id){
      return request({
        url: `${BASE_URL}/getRolesByCountId/${id}`,
        method: 'get',
      })
    },

    doAssign(assignVo){
      return request({
        url: `${BASE_URL}/doAssign`,
        method: 'post',
        data:assignVo
      })
    }

} 
